<?php
/**
 * 订单支付
 * User: tengyu
 * Date: 2017/9/29
 * Time: 10:42
 */?>
@extends('common.common')
@section('title','订单支付')
@section('css')<link rel="stylesheet" href="{{asset('/css/payBill.css')}}">@endsection
@section('js')<script src="{{asset('/js/payBill.js')}}"></script>@endsection
@section('content')
    <div id="content">
        @include('common.centernav')
        <div class="container">
            <!--选择收货地址面板-->
            <div id="panel" class="panel panel-default">
                <div class="panel-heading">
                    <h4>余额支付</h4>
                </div>
                <div class="panel-body bodyone">
                    账户余额：<span>{{$user->account}}</span>&nbsp;元
                    <button class="btn btn-warning" onclick="alert('敬请期待,研发中!')">立即支付</button>
                </div>
                <div class="panel-heading threePay">
                    <h4>第三方支付</h4>
                </div>
                <div class="panel-body bodytwo">
                    <ul id="choosePay">
                        <li value="1">
                            <img class="active" src="img/wx.png">
                            <b class="active"></b>
                        </li>
                        <li value="2">
                            <img src="img/zfb.png">
                            <b></b>
                        </li>
                        <li value="3">
                            <img src="img/yl.png">
                            <b></b>
                        </li>
                    </ul>
                    <div class="finallPay">
                        <form action="/pay_type" method="post">
                            {{csrf_field()}}
                            <input class="payType" type="hidden" name="paytype" >
                            <input type="hidden" name="id" value="{{$param['paybill']->id}}">
                            <input type="hidden" name="orders_amount" value="{{$param['paybill']->orders_amount}}">
                            <input type="hidden" name="orders_orderNo" value="{{$param['paybill']->orders_orderNo}}">
                         <p>
                            <span>实付款</span>
                            <span>¥</span>
                           <span>{{$param['paybill']->orders_amount}}</span>
                        </p>
                        <p>
                            请您确认最终支付金额，以免出现不必要的麻烦
                        </p>
                        <button class="btn pull-right" id="but">确认支付</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="{{asset('/js/jquery-1.11.3.js')}}"></script>
    <script type="text/javascript">
        $('#but').click(function(){
            var pay_type = $("input[name='paytype']").val();
            switch (pay_type){
                case '':
                    alert('请选择支付方式');
                    return false;
                case '3':
                    alert('银联支付开发中');
                    return false;
            }
        })
    </script>
@endsection